package HomeWork;

import javax.naming.PartialResultException;

/*
定义功能，计算出数组中的最小值。

数组: int[] arr = {1,43,43,5,4,6,6,7,7,88,9,9,9,0,0,9};
 */
public class Extra03 {
    public static void main(String[] args) {
        int[] arr = {1,43,43,5,4,6,6,7,7,88,9,9,9,0,0,9};

        int min = getMin(arr);
        System.out.println(min);
    }

    public static int getMin(int[] arr){
        int min = arr[0];
        for (int i = 1; i < arr.length; i++) {
            if(min > arr[i]){
                min = arr[i];
            }
        }
        return min;
    }
}
